package com.fish.anne.model;

import com.fish.anne.model.BaseObject;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;

import java.io.Serializable;

@Entity
@Table(name="order_refund" )
public class OrderRefund extends BaseObject implements Serializable {
    private Long refundId;
    private String account;
    private Long adminId;
    private String bank;
    private Long createTime;
    private String description;
    private String ip;
    private Long memberId;
    private Long money;
    private Long orderId;
    private String payAccount;
    private byte payType;
    private Long paymentTypeId;
    private String paymentTypeName;
    private Long readyTime;
    private Long receivedTime;
    private Long sentTime;
    private byte status;
    private String title;

    @Id   @GeneratedValue(strategy = GenerationType.AUTO)    
    public Long getRefundId() {
        return this.refundId;
    }
    
    public void setRefundId(Long refundId) {
        this.refundId = refundId;
    }
    
    @Column(name="account", nullable=false, length=50)
    public String getAccount() {
        return this.account;
    }
    
    public void setAccount(String account) {
        this.account = account;
    }
    
    @Column(name="admin_id", nullable=false)
    public Long getAdminId() {
        return this.adminId;
    }
    
    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }
    
    @Column(name="bank", nullable=false, length=50)
    public String getBank() {
        return this.bank;
    }
    
    public void setBank(String bank) {
        this.bank = bank;
    }
    
    @Column(name="create_time", nullable=false)
    public Long getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }
    
    @Column(name="description", nullable=false)
    public String getDescription() {
        return this.description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    @Column(name="ip", nullable=false, length=15)
    public String getIp() {
        return this.ip;
    }
    
    public void setIp(String ip) {
        this.ip = ip;
    }
    
    @Column(name="member_id", nullable=false)
    public Long getMemberId() {
        return this.memberId;
    }
    
    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }
    
    @Column(name="money", nullable=false)
    public Long getMoney() {
        return this.money;
    }
    
    public void setMoney(Long money) {
        this.money = money;
    }
    
    @Column(name="order_id", nullable=false)
    public Long getOrderId() {
        return this.orderId;
    }
    
    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }
    
    @Column(name="pay_account", nullable=false, length=250)
    public String getPayAccount() {
        return this.payAccount;
    }
    
    public void setPayAccount(String payAccount) {
        this.payAccount = payAccount;
    }
    
    @Column(name="pay_type", nullable=false)
    public byte getPayType() {
        return this.payType;
    }
    
    public void setPayType(byte payType) {
        this.payType = payType;
    }
    
    @Column(name="payment_type_id", nullable=false)
    public Long getPaymentTypeId() {
        return this.paymentTypeId;
    }
    
    public void setPaymentTypeId(Long paymentTypeId) {
        this.paymentTypeId = paymentTypeId;
    }
    
    @Column(name="payment_type_name", nullable=false, length=100)
    public String getPaymentTypeName() {
        return this.paymentTypeName;
    }
    
    public void setPaymentTypeName(String paymentTypeName) {
        this.paymentTypeName = paymentTypeName;
    }
    
    @Column(name="ready_time", nullable=false)
    public Long getReadyTime() {
        return this.readyTime;
    }
    
    public void setReadyTime(Long readyTime) {
        this.readyTime = readyTime;
    }
    
    @Column(name="received_time", nullable=false)
    public Long getReceivedTime() {
        return this.receivedTime;
    }
    
    public void setReceivedTime(Long receivedTime) {
        this.receivedTime = receivedTime;
    }
    
    @Column(name="sent_time", nullable=false)
    public Long getSentTime() {
        return this.sentTime;
    }
    
    public void setSentTime(Long sentTime) {
        this.sentTime = sentTime;
    }
    
    @Column(name="status", nullable=false)
    public byte getStatus() {
        return this.status;
    }
    
    public void setStatus(byte status) {
        this.status = status;
    }
    
    @Column(name="title", nullable=false)
    public String getTitle() {
        return this.title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        OrderRefund pojo = (OrderRefund) o;

        if (account != null ? !account.equals(pojo.account) : pojo.account != null) return false;
        if (adminId != null ? !adminId.equals(pojo.adminId) : pojo.adminId != null) return false;
        if (bank != null ? !bank.equals(pojo.bank) : pojo.bank != null) return false;
        if (createTime != null ? !createTime.equals(pojo.createTime) : pojo.createTime != null) return false;
        if (description != null ? !description.equals(pojo.description) : pojo.description != null) return false;
        if (ip != null ? !ip.equals(pojo.ip) : pojo.ip != null) return false;
        if (memberId != null ? !memberId.equals(pojo.memberId) : pojo.memberId != null) return false;
        if (money != null ? !money.equals(pojo.money) : pojo.money != null) return false;
        if (orderId != null ? !orderId.equals(pojo.orderId) : pojo.orderId != null) return false;
        if (payAccount != null ? !payAccount.equals(pojo.payAccount) : pojo.payAccount != null) return false;
         if (paymentTypeId != null ? !paymentTypeId.equals(pojo.paymentTypeId) : pojo.paymentTypeId != null) return false;
        if (paymentTypeName != null ? !paymentTypeName.equals(pojo.paymentTypeName) : pojo.paymentTypeName != null) return false;
        if (readyTime != null ? !readyTime.equals(pojo.readyTime) : pojo.readyTime != null) return false;
        if (receivedTime != null ? !receivedTime.equals(pojo.receivedTime) : pojo.receivedTime != null) return false;
        if (sentTime != null ? !sentTime.equals(pojo.sentTime) : pojo.sentTime != null) return false;
         if (title != null ? !title.equals(pojo.title) : pojo.title != null) return false;

        return true;
    }

    public int hashCode() {
        int result = 0;
        result = (account != null ? account.hashCode() : 0);
        result = 31 * result + (adminId != null ? adminId.hashCode() : 0);
        result = 31 * result + (bank != null ? bank.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (description != null ? description.hashCode() : 0);
        result = 31 * result + (ip != null ? ip.hashCode() : 0);
        result = 31 * result + (memberId != null ? memberId.hashCode() : 0);
        result = 31 * result + (money != null ? money.hashCode() : 0);
        result = 31 * result + (orderId != null ? orderId.hashCode() : 0);
        result = 31 * result + (payAccount != null ? payAccount.hashCode() : 0);
         result = 31 * result + (paymentTypeId != null ? paymentTypeId.hashCode() : 0);
        result = 31 * result + (paymentTypeName != null ? paymentTypeName.hashCode() : 0);
        result = 31 * result + (readyTime != null ? readyTime.hashCode() : 0);
        result = 31 * result + (receivedTime != null ? receivedTime.hashCode() : 0);
        result = 31 * result + (sentTime != null ? sentTime.hashCode() : 0);
         result = 31 * result + (title != null ? title.hashCode() : 0);

        return result;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer(getClass().getSimpleName());

        sb.append(" [");
        sb.append("refundId").append("='").append(getRefundId()).append("', ");
        sb.append("account").append("='").append(getAccount()).append("', ");
        sb.append("adminId").append("='").append(getAdminId()).append("', ");
        sb.append("bank").append("='").append(getBank()).append("', ");
        sb.append("createTime").append("='").append(getCreateTime()).append("', ");
        sb.append("description").append("='").append(getDescription()).append("', ");
        sb.append("ip").append("='").append(getIp()).append("', ");
        sb.append("memberId").append("='").append(getMemberId()).append("', ");
        sb.append("money").append("='").append(getMoney()).append("', ");
        sb.append("orderId").append("='").append(getOrderId()).append("', ");
        sb.append("payAccount").append("='").append(getPayAccount()).append("', ");
        sb.append("payType").append("='").append(getPayType()).append("', ");
        sb.append("paymentTypeId").append("='").append(getPaymentTypeId()).append("', ");
        sb.append("paymentTypeName").append("='").append(getPaymentTypeName()).append("', ");
        sb.append("readyTime").append("='").append(getReadyTime()).append("', ");
        sb.append("receivedTime").append("='").append(getReceivedTime()).append("', ");
        sb.append("sentTime").append("='").append(getSentTime()).append("', ");
        sb.append("status").append("='").append(getStatus()).append("', ");
        sb.append("title").append("='").append(getTitle()).append("'");
        sb.append("]");
      
        return sb.toString();
    }

}
